Easy to Create, Easy to Change - Easy to use!

Command::

list records



Parameters


Returns/Result


Examples


Reference

list records

Type

Processing Command

Purpose

The list records command tells DataEase which items to display in the procedure output for each record processed by a script. These items are called list items. Although the most common list item is a fieldname, a list item can also be a constant, a variable, or any other expression you want to include in the report output.

Syntax

for TABLENAME | RELATIONSHIP

[with selection criteria] ;

list records

FIELDNAME |VARIABLE NAME | LITERALS ;|.

end

list records [in FORMNAME | RELATIONSHIP

[named "UNIQUE RELATIONSHIP NAME" ]

[with( selection criteria) ]]

 

Usage

Each list item must be followed by a semicolon except the last, which is followed by a period. To sort, group, or generate statistics on a list item specified in a list records command, insert the appropriate operator after the list item. You cannot list or modify more than 255 fields in a single DQL Procedure.

Example 1

for MEMBERS ;

list records

STATE in groups ;

LAST NAME in order ;

TOTAL DUE : item min max sum .

end

 

 

This script tells DataEase: (1) Process all the MEMBERS records with the same value in the STATE field together as a group, (2) display the group identifier (STATE) once at the beginning of each group, (3) within each group, arrange the members in alphabetical order by LAST NAME, (4) list each member's TOTAL DUE (item), (5) list subtotals of each specified statistic for each STATE group (in groups with group-totals), (6) list the smallest TOTAL DUE (min), (7) list the largest TOTAL DUE (max), and (8) list the sum of all the TOTAL DUE amounts combined (sum). Theoutput might look as follows:

 

 

State

Last Name

Total Due

...

...

...

KY

Bouchard

$100.00

 

Denofsky

$70.00

 

Steiner

$115.00

 

Group Total

$285.00

 

 

 

LA

Orsini

$85.00

 

Rodriguez

$100.00

 

Simpson

$85.00

 

Group Total

$270.00

...

...

...

 

 

Minimum Total Due

$280.00

Maximum Total Due

$35.00

Sum Total Due

$18,190.00

 

Example 2

Although list records is usually used with the for command to list data, you can also use list records to list text literals, values stored in variables, and other values. For example, the script below prints Club ParaDEASE cruise boarding passes. It lists a text literal and values stored in a variable, joined together using the jointext function:

 

define temp "CRUISETICKETNUM" Number .

assign temp CRUISETICKETNUM := 0 .

while temp CRUISETICKETNUM < 1000 do

temp COUNTER := temp CRUISETICKETNUM + 1 .

list records

jointext( " Boarding Pass No. " , CRUISETICKETNUM ) .

end

 

The example above tells DataEase to: (1) Create a temporary variable named CRUISETICKETNUM and to assign it an initial value of zero, (2) evaluate the condition following the word while, and if the value of CRUISETICKETNUM is less than 1000, execute the actions following the word do until the end command, and (3) reevaluate the condition (CRUISETICKETNUM <1000), and if it is still true, repeat the actions until the condition becomes false.

Each time the actions are executed, the list records command tells DataEase to print the text string, "Boarding Pass No.", followed by the current value in the CRUISETICKETNUM variable. Notice that the text string "Boarding Pass No." includes a single trailing space so the ticket number prints in the correct location.

The output for this procedure might look as follows:

Boarding Pass No. 1

Boarding Pass No. 2

Boarding Pass No. 3

Boarding Pass No. 4

See Also


On the forum about list records

list records in dql, but not printoutput

If you need a "list records" in a DQL, but there sould be no output, you need the "in order" to account a result fore "enter a record", how can I do it. I have to page down all records on the window-output. if I delete the Layout, the procedure does...

Product: Dataease [{8}]FIVE. Written by Rainer 11/09/13 at 20:15:28

Re:list records in dql, but not printoutput

Hi Rainer. The "traditional" DQL implementation in DFW has always been a "pain". It was never done properly back in 1994 and it has always let the product down. PRISM (The Database/backend) and the GUI was supposed to be proper...

Product: Dataease [{8}]FIVE. Written by DataEase 12/09/13 at 06:48:10

Re:Re:list records in dql, but not printoutput

Sorry! I guess I didn't completely answer your question in clear words. ExecDQL doesn't generate any output except a CSV export file if you input a file name in the function. History/Idea behind ExecDQL <a href="http://www.datae...

Product: Dataease [{8}]FIVE. Written by DataEase 12/09/13 at 07:08:17

Re:Re:Re:list records in dql, but not printoutput

My example ist a table with sales of artikel and my dqlstatement makes sum records for Articlegroups. It is fast and it is datadriven. Tell me how you would do it in DE8. The new records are entered in the same table as you see. ...

Product: Dataease [{8}]FIVE. Written by Rainer 12/09/13 at 21:29:32

Re:Re:Re:Re:list records in dql, but not printoutput

Download Sample Hi again Rainer. It is a little difficult to use your DQL directly as we don't have the underlaying table it is supposed to manipulate.<...

Product: Dataease [{8}]FIVE. Written by DataEase 13/09/13 at 14:42:12

Re:Re:Re:Re:Re:list records in dql, but not printoutput

I see that is very useful. Can you call a DQL allso like this? ...

Product: Dataease [{8}]FIVE. Written by Rainer 14/09/13 at 20:15:23

Re:Re:Re:Re:Re:Re:list records in dql, but not printoutput

Yes, ExecDQL is just DQL without the Data-Entry form and the GUI body. The syntax is the same and you can use all the same functions. The only main difference is that it generates no output (except a CSV file which is very quick way to ex...

Product: Dataease [{8}]FIVE. Written by DataEase 15/09/13 at 07:16:50

Re:Re:Re:Re:Re:Re:Re:list records in dql, but not printoutput

I tried but i did not get it going. My statment: The Form/record my sample starts: The Fileds: MANR ,Eintritt ,Urlaubsanspruch "Execute Funktion/Derivation" ExecDQL("enter a record in BEWEGUNGEN MANR := data-entry field...

Product: Dataease [{8}]FIVE. Written by Rainer 15/09/13 at 18:43:29

Re:Re:Re:Re:Re:Re:Re:Re:list records in dql, but not printoutput

This is why you need to use MemoExecDQL() and not ExecDQL ExecDQL is the "simple" form, but as DQL use " quite a lot and the input value of ExecDQL is Text, you need to concatinate in or use a field as input. ExecDQL(...

Product: Dataease [{8}]FIVE. Written by DataEase 16/09/13 at 09:48:35

On the blog about list records